﻿
function AddUrl()
{
    var cookie = $.cookie("rurl", window.location.href,{path: '/',domain:'onlyle.com'});
}
if ($.cookie('user')) {
    $("#signin").hide();
    $("#userinfo").show();
    var sex;
    var user = $.cookie('user');
    switch (getCookieValueNew(user, "sex")) {
        case "1":
            sex = "男";
            break;
        case "2":
            sex = "女";
            break;
        default:
            sex = "未知";
            break;
    }
    $("#userinfo img").attr("src", getCookieValueNew(user, "img"));
    $("#logtitle").text("欢迎您：");
    $("#userinfo h3").text(getCookieValueNew(user, "username"));
    $("#info").html(sex + " | " + getCookieValueNew(user, "province") + "  " + getCookieValueNew(user, "city"));
}
else {
    $("#signin").show();
    $("#userinfo").hide();
}